package co.edu.unal.geditor.view;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;

import co.edu.unal.geditor.model.GraphElement;
import co.edu.unal.geditor.model.LineElement;

public class LineGraphView extends ElementView
{
	public LineGraphView( GraphElement ge )
	{
		super( ge );

		assert ge instanceof LineElement;
	}

	@Override
	public void paint( Graphics g )
	{
		
		Point ul = m_owner.getUpLeft();
		Point bd = m_owner.getDownRight();
		Color color = m_owner.getLinesColor();
		
		g.setColor( color );
		g.drawLine( ul.x, ul.y, bd.x, bd.y );
		super.paint( g );
		
		
	}
	
}
